home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
clipper
/
funcky.zip
/
VIEW.DOC
< prev
next >
Wrap
Text File
|
1988-11-13
|
48KB
|
637 lines
FUNCky Demo Program Copyright dLESKO ASSOCIATES 1988. All Rights
Reserved. No part of this program may be distributed for any
purpose other than to demonstrate the capabilities of the FUNCky
Library for Clipper
View is a sample program written using functions from the FUNCky
library for Clipper that demonstrates usage of the mouse
functions, programming for multiple video modes, font loading and
in general the basic principles when creating dropdown tear off
menus similar to the Macintosh interface. With view you can view
text files in moveable and resizeable windows. View supports
almost every video mode you can throw at it (except graphics
modes) with no special programming. If you have an EGA or VGA and
your adaptor supports 43, 50 or 60 line mode, View will love it.
If you can go up to 132 columns, you can also see how Clipper can
now work in those modes as well.
To start View, simply type View and optionally the drive letter
of the drive you wish to view text files on. As in the sequence:
View C: <return>
Once View has started, a status line on the bottom of the screen
displays the currently selected drive, path and filename. To view
a file, select the directory you want to view, then select the
file, then select view from the menu and a window will open
displaying the contents of the text file. You can bring up
multiple views of the same text file by pressing F1 after you
display the first view window. The maximum
number of windows you can open is 4. Use the mouse to move the
windows to make room for the new window before you open a new
window since only the top window is active.
The various aspects of the mouse functions can be demonstrated as
well. If you have a mouse, you can click on any option to pull
down the sub menu. To select a sub menu item, just click on that
item and it is selected. The idea of tear off drop menus is
accomplished by placing the mouse cursor in the middle of the sub
menu and pressing the right mouse button. While holding it down
you can drag the sub menu anywhere on the screen you like. You
can also re-size the drop down menu by placing the mouse cursor
on the right border of the box and while holding down the right
mouse button, drag the box's border to the right or left. To
display more lines of the drop down menu, place the mouse cursor
on the bottom edge of the box border and while holding down the
right mouse button, pull the box border up and down. Another
type of moveable window is available. In the mode window you
can specify Macintosh like or normal. Macintosh windows move around
a little faster since only the frame of the window is drawn as
you move it. The entire window is repainted only when you release
a key or mouse button.
You can also use the mouse to emulate all the keyboard like
control keys. To scroll up the menu, click the left mouse button
while the mouse cursor is on the up arrow in the control panel.
To scroll down, click the left button while the mouse cursor is
on the down arrow. To page up and page down, click the right
mouse button on the up or down arrow. You can also pan the inner
contents of the menu if the contents exceed the width of the
menu. Just click the left or right button on the left and right
arrows in the control panel of the menu. The file view window
also emulates these same procedures, except that the panning
arrows move the contents of the text file in 8 column increments.
If you don't have a mouse you can still emulate all the above
outlined options using the keyboard. Press the scroll lock key
and then use the arrow keys on the numeric keypad to move the
drop down menu, or the file view window to the position you like
on the screen. When it is in place, release the scroll lock key.
To expand the drop down menus, use the left shift key and the
arrow keys on the numeric keypad to expand or grow the dropdown.
the left and right arrow keys expand the box right and left while
the up and down arrow keys pull up or down the bottom of the
dropdown. To select menu items, you can scroll the highlight to
any item you want and press return to select it.
That's about all there is to view. If you have an EGA or VGA
monitor, you can check out the various screen modes and fonts in
the MODE option on the main menu. Study the VIEW.PRG file to see
how it was done. Note that you cannot compile the source code if
you do not have the FUNCky Library for Clipper. The following
text outlines some of the capabilites of the library. A listing
of the table of contents list the major functions in the library.
Give it a looksee, if you like it I guess I'll be speaking to you
soon.....
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What is FUNCky you ask? - well, I think it's the neatest library
to ever come out for Clipper.....
With FUNCky you have the largest array of functions ever
assembled in one place. You get top quality documentation on over
400 functions for Clipper. There are also around 30 or so re-
written Clipper functions. They have been written in tighter
faster code. With greater speed so you get increased options.
Like with FILE IO. The low level file funcitons in Clipper have
been completely re-written so that you can now do things like
store your menu options in text files that you can edit inside
the appplication using memoedit(). You can create help systems
that display text files in windows, use the fantastic flocate()
function to locate text strings in files, then use the speedy
freadline() to read the lines of text into a string. You could
use afileread() to load lines of text from a file into arrays.
All the low level file functions of course interact directly to
with Clipper's own ferror() function.
You also get mouse support, not little dweeby functions to read a
mouse button or display a mouse cursor, but real mouse support.
use mx_choice() to emulate achoice() with scroll bars, a control
panel, resizing, dynamically expanding windows, grab the window
and move it. Display DBF files like dbedit() in the same type of
dynamic windows. Use the mouse to select records or scroll the
database. Grab the window and move it so you can pop up several
DBF scroll windows at once!, use mx_view() to view text files in
the same type of moveable-resizeable windows. Create popup,
dropdown, tear off, moveable, resizeable menus, etc. etc. etc.
All in all around 70 mouse functions to do almost anything you
want,
You also get extensive video support. You can use as many video
pages as your adaptor supports, create virtual screens and
windows in memory, display menus on the monochrome screen and
color screen at the same time (if you have two monitors), write
programs in 43 and 50 line mode on your EGA or VGA adaptor with
full support of gets / menu to / savescreen() etc... Get 64
colors on